#

THE ATARI 6502 DISASSEMBLER

##

Output Customization

The disassembler is compatible with MAC/65 and it's highly customizable. In the Options menu, choose Assembler format option. It will open a dialog box where you can customize the disassembler to meet your assembler syntax.

When you have entered all the parameters for your assembler, you can save them into a .PRF file. This chapter explains all the fields of the dialog box.

You can load the .PRF file corresponding to your assembler by clicking on the Load profile button.

Three .PRF files are given:

- MAC/65,
- Assembler/Editor cartridge,
- LADS.

LADS is an assembler that does not support many directives. It does not support .WORD and .SBYTE, does not want labels or equates in .BYTE, uses space as value separator in .BYTE,...In fact, it was very good to see if the disassembler could be customized !

If you want DIS6502 to load your profile automatically, save your settings in a file called ATARI.PRF, ORIC.PRF or 5200.PRF depending on computer mode. On startup, DIS6502 tries to load this file.

NOTE: If you use any other assembler and make a .PRF for it, please send it to my email address shown in the About box of the disassembler. I will include it in the next release.

When you open the 'Assembler format' dialog box, you see 3 sections called:

- General,
- Directive syntax,
- Include files.

The fields of these 3 sections are explained below:

###

General section

- Comment

  The only comments added to the listing are full line comments (no comments after an instruction for exemple). You can define here the string for a comment.

  Default: ;

- Hex prefix

  String identifying an hexadecimal value.

  Default: $

- Illegal instructions

  If your assembler supports all illegal instructions, you can check this option. The disassembler will disassemble all the illegal instructions and will write them in lowercase so you can recognize them in the listing.

  Default: OFF

- Line numbering

  Used to know if the disassembler should generate line numbers.

  Default: OFF

  Note: MAC/65 uses line numbering but I set the default to OFF because you can use the ENTER #D:filename.ASM,A option to load the source and add line numbers at loading time.

- Align instructions

  This option is used to align instructions.

  If it's ON, you will have something like that:

  If it's OFF, the listing will show

  Default: ON

- Use hex notation

  All values are displayed as hex numbers if this option is set to ON. Otherwise, everything is displayed in decimal.

  Default: ON

- Display 'A' in Accumulator mode

  Some assemblers like 'LADS' do not support an operand for accumulator mode. For example: LSR A generates a syntax error with LADS. The disassembler should generate LSR instead of LSR A.

  Default: ON

###

Directive syntax section

- Numbers only in .BYTE

  If your assembler does not support labels or equates in .BYTE directive, you have to check this option. When turned OFF, the assembler can generate the following lines:

  .WORD L33EF
  .BYTE AEMPTY8

  If this option is turned ON, the disassembler will generate

  .BYTE $EF,$33,$70

  Default: OFF

- .WORD allowed

  If your assembler has a directive to reserve space for a WORD, you should check this option and enter the syntax for it.

  Default: ON and .WORD

- .BYTE

  This option must exist in your assembler...but with another name. So you can enter the name of your directive to reserve one byte.

  Default: .BYTE

- Sep

  When putting several bytes in a .BYTE directive, the disassembler must know which separator to use between the bytes.

  Default: ,

- .SBYTE allowed

  If your assembler has an option that let you enter string of text with Screen (or Antic) codes, you should check this option and enter the directive syntax.

  Default: ON and .SBYTE

- .ORG

  Enter the directive to set the program counter.

  Default: *=

- Low byte

  This option defines the syntax used for the type 'Code with Low byte'. The disassembler must know how to extract the low byte from a word (or from a label). In MAC/65, '<LABEL' is used. In the Assembler/Editor cartridge, you have to mask the high byte with 'LABEL&$00FF'. Another assembler might use a syntax like 'LOBYTE(LABEL)'. To support varied syntax, you have 2 fields in this option. The first one is the string that will appear BEFORE the address (or label). The second one is the string that will appear AFTER the address (or label). Here are 3 examples:

  MAC/65: LDA # <L33EF

  Asm/Ed: LDA #L33EF&$00FF

  Other assembler: LDA #LOBYTE(L33EF)

  Default: <

- High byte

  Same as Low byte !

  Default: >

- EQU

  This is the syntax to define an equate.

  Default: =

- .END

  This is the complete syntax to end a disassembly listing. Enter the name of the directive for your assembler. Some assemblers need the name of the source file name after this directive: .END D:TEST.ASM In this case, you should check the 'Add filename' checkbox.

  Default: .END

- .DS allowed

  If your assembler has a directive to reserve space for uninitialized data, you should check this option and enter the syntax for it.

  Default: ON and .DS

###

Include files section

- .INCLUDE

  This option defines the syntax used to include a file. This becomes important when you have a large source file. In this case, you split the file into several ones and link them with this directive. To support all the syntaxes for this directive, you have 2 fields in this option. The first one is the string that will appear BEFORE the filename. The second one is the string that will appear AFTER the filename.

  Default: .INCLUDE #

- Number of lines per include file.

  You can set the maximum number of source lines to put in a source file. This is to prevent the disassembler from generating large source files that your editor can not load into memory.

  Default: 500

- Inclusion method

  There are 2 ways for including files.

  The first one makes a main source file that includes all other files.
  The second one is to include the next file at the end of each source file. Click on the method that your assembler accepts.

  Default: All files included in 1 main file

- Include files allowed.

  Click this check box if your assembler supports include files AND if you wish to generate multiple files for your source.

  Default: ON